/*
*****************************************************************************************
 
Made by www.Flashphoner.com, all rights reserved.
These sources can only be used for working with Flashphoner server.
If you want use this to create your own application (separate from Flashphoner server) 
please contact support@flashphoner.com 

*****************************************************************************************
*/

package com.flashphoner.phone.views
{
    import flash.events.Event;
    import flash.events.MouseEvent;
    
    import mx.containers.Panel;
    import mx.controls.LinkButton;

    public class DragPanel extends Panel{
        
        public function DragPanel(){
            super();
        }
        
        override protected function createChildren():void{
            super.createChildren();
            this.addEventListener(MouseEvent.MOUSE_DOWN,handleDown);
            this.addEventListener(MouseEvent.MOUSE_UP,handleUp);
        }
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
            super.updateDisplayList(unscaledWidth,unscaledHeight);
        }
        
        private function handleDown(e:Event):void{
            this.startDrag();
        }
        private function handleUp(e:Event):void{
            this.stopDrag();
        }
        
        private function closeMe(e:MouseEvent):void{
            this.visible = false;
        }
    }
}